#include <cstdio>
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main(void){
    string a,b;
    cin >> a;
    cin >> b;
    reverse(a.begin(),a.end());
    if(!a.compare(b)){
        printf("YES\n");
    }
    else{
        printf("NO\n");
    }
    return 0;
}